home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 1 / ETO Development Tools 1.iso / Essentials / C++ AppleLink Messages / CPlus.Dev$ 3⁄16⁄90 / 0080-Re Dead Code Strippi-Mar90 < prev    next >
Encoding:
Text File  |  1990-03-16  |  1.3 KB  |  38 lines  |  [TEXT/GEOL]

  1. Item    2727711                         15-March-90        09:33PST
  2.  
  3. From:   VALOIS1                         Valois, John E.
  4.  
  5. To:     CPLUS.APPLE$                    C++ Interest List--Apple Employees
  6.         CPLUS.DEV$                      C++ Interest List--Developers
  7.         NAUTIL                          France - Dev, Nautil Info Lyon,IDV
  8.  
  9. Sub:    RE>Dead Code Stripping wi
  10.  
  11. Attn: C++ Apple
  12. Attn: C++ Developers
  13. Attn: Etienne Vautherin
  14. SentBy: Jack Valois
  15.  Subject         RE>Dead Code Stripping with C++
  16. Etienne, let me take a stab at answering this one for you.  I am new to C++
  17. but, I had this one explained to me once and I think that I have it right now.
  18.  
  19. >Is it necessary to keep in memory one instance of each "dead strip candidate"
  20. class?
  21. >Could the sample in "Release Notes, Preliminary C++ Interfaces For MacApp
  22. 2.0ß9" p.3, be written:
  23.  
  24. >if (gDeadStripSuppression) {
  25. >    TFoo* aFoo = new TFoo; aFoo.Free;
  26. >    TFoo2* aFoo2 = new TFoo2; aFoo2.Free;
  27. >}
  28.  
  29. The code fragment that you add to prevent dead code stripping is there to fake
  30. out the linker.   If you examine the variable gDeadStripSuppression you will
  31. find out that it is never true.  So, that code fragement never gets executed.
  32.  Therefore you won't have an instance of each "dead strip candidate class" in
  33. memory.
  34.  
  35. Jack Valois
  36.  
  37.  
  38.